import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, util, sim_items
from util import *

class EternalFlame(sim_items.LightSource):
    def __init__(self):
        sim_items.LightSource.__init__(self,
                'eternal flame',     #name
                50,     # layer
                parole.map.AsciiTile('*', colors['GoldenRod']),
                1000,  # weight
                3000,   # light
                colors[random.choice(['DarkRed', 'IndianRed', 'FireBrick', 'Tomato'])],  # light color
                3,    # light intensity
                120000*600000,  # burn time
                unidDescription="An endless pyre burning in honor of"\
                    "a fallen hero.",
                showBurnTime=False,
                dousable=False,
                litAdjective="blazing",
                handsNeeded=0)

        self.snuffable = False
        self.startIntensity = self.lightIntensity
        self.startBurnTime = self.burnTime
        main.schedule.add(sim.Event('activate light', main.schedule.time,
            (self,), dests=[self]))
        self.fading = False


#========================================
thingClass = EternalFlame
